package com.xue.web.dao;


import com.xue.web.utils.JdbcTools;

import java.io.IOException;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;

public class LoginDao {
    public Map<String, List<Object>> selectUser(String username){
        System.out.println(this.getClass().getName()+"|执行查询");
        JdbcTools jdbcTools =new JdbcTools("jdbc.properties");

        try {
            return jdbcTools.executeQuery("SELECT user_name,user_password from x_user where user_name = ?", new Object[]{username});
        } catch (SQLException | IOException | ClassNotFoundException e) {
            System.out.println("查询时候发生异常");
        }
        return null;
    }
}
